package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 服务分享记录实体，对应Python的ServiceShareRecord模型
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "service_share_record",
       uniqueConstraints = @UniqueConstraint(columnNames = "group_share_id"))
public class ServiceShareRecord extends BaseEntity {
    
    @Column(name = "group_share_id", length = 32, unique = true, nullable = false)
    private String groupShareId;
    
    @Column(name = "group_id", length = 32, nullable = false)
    private String groupId;
    
    @Column(name = "team_name", length = 64, nullable = false)
    private String teamName;
    
    @Column(name = "event_id", length = 32)
    private String eventId;
    
    @Column(name = "share_version", length = 15)
    private String shareVersion;
    
    @Column(name = "share_version_alias", length = 64)
    private String shareVersionAlias;
    
    @Column(name = "share_app_version_info", length = 255, nullable = false)
    private String shareAppVersionInfo;
    
    @Column(name = "is_success", nullable = false)
    private Boolean isSuccess = false;
    
    @Column(name = "step", nullable = false)
    private Integer step = 0;
    
    @Column(name = "status", nullable = false)
    private Integer status = 0; // 1:发布中 2:取消发布 3:发布完成
    
    @Column(name = "app_id", length = 64)
    private String appId;
    
    @Column(name = "scope", length = 64)
    private String scope;
    
    @Column(name = "share_app_market_name", length = 64)
    private String shareAppMarketName;
    
    @Column(name = "share_store_name", length = 64)
    private String shareStoreName;
    
    @Column(name = "share_app_model_name", length = 64)
    private String shareAppModelName;
}